<?php
include('../adodb5/adodb.inc.php');


function getDbWithoutControll()
{
	$db = NewADOConnection('mysql');
	$db->Connect("localhost", "root", "aaaaa", "scheduler");

	return $db;
}

function getDb()
{
	$db = getDbWithoutControll();
	
	$sqlCommand="SELECT logged FROM access WHERE logged=1";
	
	$result = $db->Execute($sqlCommand);
	
	if ($result === false)
		die($sqlCommand);
	

	if ($result->EOF)
	{
		die("Not logged!");
	}
	
    return $db;
}
?>